package action.bbs;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.ibatis.session.SqlSession;

import mybatis.conService.ServiceFactory;


import vo.bbs.Bbs_tVO;
import vo.ResultVO;
import control.ActionInter;

public class Bbs_A implements ActionInter{

	@Override
	public ResultVO excute(HttpServletRequest request,
			HttpServletResponse response) {
		// TODO Auto-generated method stub
			SqlSession ss = ServiceFactory.getFactory().openSession();
			Map<String, Integer> map = new HashMap<String, Integer>();
			map.put("begin", 1);
			map.put("end", 20);
			List<Bbs_tVO> list = ss.selectList("bbsList",map);
			request.setAttribute("bbsList", list);
			
			ResultVO vo = new ResultVO();
			vo.setCmd("post");
			vo.setUrl("bbs/bbs.jsp");
		return vo;
	}

}
